#include <iostream>
#include <fstream>
#include <time.h>

using namespace std;

time_t getTimeInSeconds()
{
    time_t seconds;
    seconds = time (NULL);
    return seconds;
}

void    appFile(time_t interval)
{
    ofstream outfile;
    outfile.open("/tmp/test.txt", std::ios_base::app);
    outfile << interval << endl;
    outfile.close();
}

int main()
{
    time_t segundos = getTimeInSeconds();
    cout << "segundos : " << segundos << endl;
    appFile(segundos);
    return 0;
}

